<?php require APP_PATH_ISAS.'common/web_head_doc.php';
echo $_SERVER['PATH_INFO'];
?>
<html>
<head>
    <title>TTTTTTTTT</title>
    <?php require APP_PATH_ISAS.'common/web_head_meta.php';?>
    <meta name="keywords" content="轩辕网络 学员中心个人平台 " />
    <meta name="description" content="轩辕网络 学员中心个人平台 " />
    <?php require APP_PATH_ISAS.'common/web_head_link.php';?>
    <link rel="stylesheet" type="text/css" href="<?php echo STYLE_PATH;?>css/course_center.css">
    <style>
		.header { display: none;}
		.file_input input{padding-left: 5px; font-size: 14px; width:300px;}
		.stock_period_select input{margin-left: 10px;}
		.btn input { width: 50px; height: 25px; margin-left: 20px; cursor: pointer;}
		.console { margin-left:20px; border:1px solid #000; width:1000px; height:150px;
			background:#101010; color:#8FC0F8; padding:5px 0 0 5px; font-size:14px; overflow:scroll;
		}
		.data_ana input{ width: 50px; height: 30px; cursor: pointer;}
	</style>
    <?php require APP_PATH_ISAS.'common/web_head_script.php';?>
    <script type="text/javascript">
	    $(function(){
	
	    });	

		
	    
	    function ma_ana(idcPeriod){
	    	var url = "/Isas/DataHandle/ana_indicator";
	    	var year = 2016;
	    	var period = '1_d';
			var params = "idc=ma&idc_period="+idcPeriod+"&period="+period+"&year="+year;
	    	$.ajax({ url: url+"?"+params, dataType:"text",async:true, success: function(data){
				Cs.set('完成ma分析');
	    		
			}});
	    	
	    }

		function importStock(){
			var path = $("#stock_file_path").val();
			var url = "/Isas/DataHandle/importStockData";
			var params = "filePath="+path+"&year=2016";
			Cs.clear();
			//getProgress();
			$.ajax({ url: url+"?"+params, dataType:"text",async:true, success: function(data){
				Console.add('完成');
			}});
			
		}

		function getProgress(){
			var url = "/Isas/DataHandle/getProgress";
			$.ajax({ url: url, dataType:"text",async:true, success: function(data){
				Cs.add(data);
				var _data = data.split("|");
				if(_data[3] == "1"){
					setTimeout(function(){
						getProgress();
					},1);
				}
			}});
		}
		
	    function hide(){
			$("body").hide();
		}
	</script>
    <!-- saved from url=(0013)about:internet -->  
</head>
<body>
	
	<!-- header start -->
	<?php require APP_PATH_ISAS.'common/header.php';?>
	<!-- header end -->

    <!-- content start -->
    <div class="content clearfix">
        <!-- course classify nav start -->
        <div class="classify clearfix">
            <p>股票K线导入：</p>
            <ul class="c_classify">
                <li>
                	<span class="file_input">
                	文件：<input type="text" id="stock_file_path" value="E:\soft\new_tdx\T0002\export" />
                	</span>
                	<span class="stock_period_select">
	                	<input type="radio" name="stock_period_select" checked="checked" value="1D"/>1D
	                	<input type="radio" name="stock_period_select" value="1H"/>1H
	                	<input type="radio" name="stock_period_select" value="30M"/>30M
                	</span>
                	<span class="btn">
                		<input type="button" value="导入" onclick="importStock();" />
                	</span>
                </li>
                
      
            </ul>
            <p>数据分析：</p>
            <ul class="c_classify data_ana">
                <li><input type="button" value="ma_5" onclick='ma_ana(5)'></li>
      			<li><input type="button" value="ma_10" onclick='ma_ana(10)'></li>
            </ul>
        </div>
        <!-- course classify nav end -->
		<div class='console' id="console">>_</br></div>
<input type="button" value="TTT" onclick="hide()" style="width:50px;height:50px;" />
    </div>
    <!-- content end -->


	<!-- footer start -->
	<?php require APP_PATH_ISAS.'common/footer.php';?>
	<!-- footer end -->
	
</body>
</html>